CFLAGS=-g

SOURCES=bose-nel.c bubble.c heap.c insert.c linsert.c makedata.c \
		qstest.c quick1.c quick2.c quick3.c quick4.c shell.c

PROGRAMS=$(SOURCES:.c=)

all: ${PROGRAMS}

bose-nel: bose-nel.c
	${CC} ${CFLAGS} -o $@ $< -lm
bubble: bubble.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c
heap: heap.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c
insert: insert.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c -DDRIVER 
linsert: linsert.c
	${CC} ${CFLAGS} -o $@ $< lsortsub.c
makedata: makedata.c
	${CC} ${CFLAGS} -o $@ $<
qstest: qstest.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c
quick1: quick1.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c
quick2: quick2.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c insert.c
quick3: quick3.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c insert.c
quick4: quick4.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c insert.c
shell: shell.c
	${CC} ${CFLAGS} -o $@ $< sortsub.c
    
clean:
	rm -rf ${PROGRAMS}
